<template>
    <div id='' class='detail_info'>
        <div class="crumbs">
            <Breadcrumb>
                <BreadcrumbItem to="/content/index">首页</BreadcrumbItem>
                <BreadcrumbItem :to="'/detailView/index/'+type">{{type}}</BreadcrumbItem>
                <BreadcrumbItem to="">国务院关于统一海南藏族自治州建设国家可持续发展议程创新示范区的批复</BreadcrumbItem>
            </Breadcrumb>
        </div>
        <div class="header_title">
            {{info.title}}
        </div>
        <div class="describe">
            <div class="title">
                <span>发文来源：{{info.releaseDept}}</span>
                <div class="file" v-if="info.doc" @click="downLoad(info.doc)">
                    <img :src="pdfImg" alt="">
                    <span>{{info.doc.name}}</span>
                </div>
            </div>
            <div class="time">发文日期：{{info.releaseDate}}</div>
        </div>
        <div class="content" v-html="info.contentStr"></div>
        <div class="footer">
            <!-- <div class="up_page">
                <span>上一篇：</span>
                <span>没有了</span>
            </div>
            <div class="down_page">
                <span>下一篇：</span>
                <span>齐齐哈尔不动产项目中标公告</span>
            </div> -->
        </div>
        <div class="footer_end">
            <div>
                技术支持：云图信息（吉林）股份有限公司
            </div>
            <div>
                联系电话：400-6122-555
            </div>
        </div>
    </div>
</template>
<script>
import pdfImg from '@/assets/svg/fontApp/pdf_icon.svg'
import { mapState, mapActions } from 'vuex';
import headerLoge1 from '@/assets/svg/login/login_logo.svg'
export default {
    name: '',
    props: [''],
    data() {
        return {
            info: {},
            pdfImg: pdfImg,
            type: '',
            id: '',
        };
    },
    components: {},
    computed: {},
    beforeMount() { },
    mounted() {
        this.type = this.$route.params.type;
        this.changeHeader([
            { key: 'bgColor', value: 'rgba(0,0,0,0.03)' },
            { key: 'logoImg', value: headerLoge1 },
        ])
        this.getInfo()
    },
    methods: {
        ...mapActions('extend/header', [
            'changeHeader'
        ]),

        getInfo(id) {
            this.$http.$get('InformationDetails', { params: { id } }).then(res => {
                if (res.code == 200) {
                    this.info = res.data
                    return
                }
                this.$Message.error(res.msg);
            })
        },

        downLoad(file) {
            // let url = window.config.fileServer + file.minioPath;
            // let fileName = file.name;
            // const a = document.createElement('a');
            // a.style.display = 'none';
            // a.setAttribute('target', '_blank');
            // fileName && a.setAttribute('download', fileName);
            // a.href = url;
            // document.body.appendChild(a);
            // a.click();
            // document.body.removeChild(a);
        }

    },
    watch: {}
}
</script>
<style lang='less' scoped>
.detail_info {
    background: #ffffff;
    width: 100%;
    padding: 100px 350px 0 350px;
    .header_title {
        height: 108px;
        line-height: 108px;
        font-size: 24px;
        font-family: PingFang SC-Semibold, PingFang SC;
        font-weight: 600;
        color: #17233d;
        width: 100%;
        text-align: center;
    }
    .describe {
        display: flex;
        justify-content: space-between;
        height: 45px;
        align-items: center;
        border-bottom: 1px solid #e8eaec;
        .title {
            display: flex;
            span {
                font-size: 16px;
                font-family: PingFang SC-Regular, PingFang SC;
                font-weight: 400;
                color: #808695;
            }
            .file {
                cursor: pointer;
                margin-left: 40px;
                display: flex;
                justify-content: center;
                align-items: center;
                img {
                    width: 16px;
                }
                span {
                    margin-left: 10px;
                    font-size: 16px;
                    font-family: PingFang SC-Regular, PingFang SC;
                    font-weight: 400;
                    color: #3399ff;
                }
            }
        }
    }
    .content {
        height: 480px;
        overflow: auto;
    }
    .footer {
        height: 130px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        .up_page {
            cursor: pointer;
            font-size: 16px;
            font-family: PingFang SC-Regular, PingFang SC;
            font-weight: 400;
            color: #808695;
        }
        .down_page {
            cursor: pointer;
            margin-top: 20px;
            span {
                font-size: 16px;
                font-family: PingFang SC-Regular, PingFang SC;
                font-weight: 400;
                color: #808695;
            }
            span:not(:first-child) {
                font-size: 16px;
                font-family: PingFang SC-Bold, PingFang SC;
                font-weight: bold;
                color: #2d8cf0;
            }
        }
    }
    .footer_end {
        float: left;
        margin-left: -350px;
        font-size: 16px;
        font-family: PingFang SC-Regular, PingFang SC;
        font-weight: 400;
        color: #515a6e;
        background: #f8f8f9;
        width: 1920px;
        height: 48px;
        display: flex;
        justify-content: center;
        align-items: center;
        div:not(:first-child) {
            margin-left: 40px;
        }
    }
}
</style>